.milkdown {
  height: 100%;
  background: var(--background-color-1);
  .editor {
    height: 100%;
    .milkdown-image-block {
      height: 100%;
      .image-wrapper {
        height: 100%;
      }
    }
  }
}
.milkdown .milkdown-image-block > .image-wrapper img {
  max-height: 100%;
}
.milkdown-block-handle {
  top: -100px;
  position: fixed;
}
@headers: h1, h2, h3, h4, h5, h6;

each(@headers, {
  @{value} {
    position: relative;
    &::before {
      content: "@{value}"; // 输出  h1 、 h2  等
      position: absolute;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      right:calc(100% + 2px);
      top: 50%;
      transform: translateY(-50%);
      height: 14px;
      color: var(--text-color-2);
      padding: 2px 4px;
      font-size: 10px;
      border: 1px solid var(--border-color);
      border-radius: 4px;
      opacity: 0
    }
    &:hover::before {
      opacity: 1;
      transition: opacity 0.2s ease-in-out;
    }
  }
});

.ProseMirror-focused.ProseMirror .prosemirror-virtual-cursor {
  --prosemirror-virtual-cursor-color: #73777f;
  border-left: 2px solid var(--prosemirror-virtual-cursor-color);
  animation: prosemirror-virtual-cursor-blink 1s linear infinite;
  animation-delay: 0.1s;
  transform: translateX(1px);
}

@keyframes prosemirror-virtual-cursor-blink {
  0%,
  100% {
    opacity: 1 !important;
  }
  50% {
    opacity: 0;
  }
}
